Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

{crucible,crux}-llvm: Adapt to elliottt/llvm-pretty#118 #1162

Merged
merged 1 commit into from
Jan 10, 2024

Conversation

RyanGlScott
Copy link
Contributor

This patch:

  • Bumps the llvm-pretty and llvm-pretty-bc-parser submodules to recent commits that include the changes from Use Fmt encapsulation and add LLVMPretty class llvm-pretty#118.
  • Introduces a ppLLVMLatest combinator to Lang.Crucible.LLVM.PrettyPrint that prints a Fmt value (from Text.LLVM.PP) using the latest version of LLVM that llvm-pretty supports.
  • Uses ppLLVMLatest in the appropriate places to fix compilation errors.

Fixes #1145.

@@ -133,8 +134,7 @@ makeGlobalMap ctx m = foldl' addAliases globalMap (Map.toList (llvmGlobalAliases
++ ": "
++ err)
where showSymbol sym =
show $ let ?config = LPP.Config False False False
in LPP.ppSymbol $ sym
show $ ppLLVMLatest $ LPP.ppSymbol $ sym
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I opted to change the Config used here for consistency's sake. The ppSymbol function doesn't make use of any Config-specific options anyway.

Copy link
Contributor

@langston-barrett langston-barrett left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Might be worth creating helpers such as ppType = ppLLVMLatest L.ppType, etc.

crucible-llvm/src/Lang/Crucible/LLVM/PrettyPrint.hs Outdated Show resolved Hide resolved
This patch:

* Bumps the `llvm-pretty` and `llvm-pretty-bc-parser` submodules to recent
  commits that include the changes from
  GaloisInc/llvm-pretty#118.
* Introduces a `ppLLVMLatest` combinator to `Lang.Crucible.LLVM.PrettyPrint`
  that prints a `Fmt` value (from `Text.LLVM.PP`) using the latest version of
  LLVM that `llvm-pretty` supports.
* Uses `ppLLVMLatest` in the appropriate places to fix compilation errors.

Fixes #1145.
@RyanGlScott RyanGlScott force-pushed the T1145-bump-llvm-pretty branch from 1038a36 to 4739fe7 Compare January 10, 2024 18:29
@RyanGlScott RyanGlScott merged commit c4e01c5 into master Jan 10, 2024
31 checks passed
@RyanGlScott RyanGlScott deleted the T1145-bump-llvm-pretty branch January 10, 2024 20:47
RyanGlScott added a commit that referenced this pull request Feb 1, 2024
RyanGlScott added a commit that referenced this pull request Feb 1, 2024
RyanGlScott added a commit that referenced this pull request Feb 5, 2024
RyanGlScott added a commit that referenced this pull request Feb 5, 2024
RyanGlScott added a commit that referenced this pull request Feb 5, 2024
RyanGlScott added a commit that referenced this pull request Feb 6, 2024
RyanGlScott added a commit that referenced this pull request Feb 6, 2024
(cherry picked from commit d8fba04)
RyanGlScott added a commit that referenced this pull request Feb 6, 2024
(cherry picked from commit d8fba04)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Adapt crucible-llvm to more llvm-pretty functions requiring implicit ?config parameters
3 participants